package com.example.compose.view.ui

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

/**
 * @Author jiangKunKun
 * @CreateDate 2025/8/22
 * @Description Box, Column, Row, Text, Button, TextField, Image, Spacer, Divider
 * @SpittingGrooves
 */
class TheFirstStageActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContent {
            TheFirstStageScreen()

        }

    }
}
@Composable
fun TheFirstStageScreen() {
    Box (
        contentAlignment = Alignment.Center,
        modifier = Modifier
            .size(200.dp)
            .background(Color.Blue)
            .border(5.dp, Color.Red)
    ){
        Text(text = "底层文本",
            modifier = Modifier
            .size(100.dp)
            .background(Color.Blue)
            .border(5.dp, Color.Red))
        Text("顶层文本ABC")
    }
}

@Preview(
    showBackground = true,
    widthDp = 360,
    heightDp = 640
)
@Composable
fun PreviewTheFirstStageScreen() {
    TheFirstStageScreen()
}